import { ApiProperty } from '@midwayjs/swagger'

import { ResultVO } from '@/vo'

/**
 * 在线信息结果
 */
class OnlineInfoVO implements IOnlineInfo {
  @ApiProperty({ description: '会话编号' })
  tokenId: string

  @ApiProperty({ description: '用户编号' })
  userId: string

  @ApiProperty({ description: '用户账号' })
  userName: string

  @ApiProperty({ description: '用户账号' })
  deptName: string

  @ApiProperty({ description: '登录IP' })
  loginIp: string

  @ApiProperty({ description: '登录IP' })
  loginLocation: string

  @ApiProperty({ description: '操作系统' })
  os: string

  @ApiProperty({ description: '操作系统' })
  browser: string

  @ApiProperty({ description: '登录时间' })
  loginDate: Date
}

/**
 * 获取在线信息分页结果
 */
export class GetOnlinePageVO extends ResultVO([OnlineInfoVO]) {}
